home *** CD-ROM | disk | FTP | other *** search
/ Aminet 12 / Aminet 12 (1996)(GTI - Schatztruhe)[!][Jun 1996].iso / Aminet / util / boot / ClickForMenu.lha / ClickForMenu1.10 / ClickForMenu.doc < prev    next >
Encoding:
Text File  |  1996-03-14  |  3.4 KB  |  89 lines

  1.  
  2.                  ClickForMenu
  3.                      V1.10
  4.                   8 Mar 1996
  5.  
  6.  
  7.                    Frantisek Dufka
  8.                    Hlavni 218
  9.                    687 25, Hluk
  10.                    Czech Republic
  11.  
  12.               e-mail: dufkaf@risc.upol.cz
  13.  
  14. This program is public domain. You can freely distribute it as long as you
  15. keep all the files unchanged. You are using it on your own risk.
  16.  
  17.  
  18. I hate writing documentation, so let's do it briefly.
  19.  
  20. This little commodity changes the way intuition menus work.
  21.  
  22. With ClickForMenu activated, menu is selected by clicking the right mouse
  23. button. There's no need to hold it. Menu item selection is completed by
  24. clicking left or right button. Middle button selects item, but does not exit,
  25. so you can use it for checking multiple checkmarks. The old way of using menu
  26. (hold - move - release) works too, so no one will be confused.
  27.  
  28. Tested only on my A1200/030/28Mhz, but should work also on 68000 based
  29. machines with OS 2.0.
  30.  
  31. Of course you can use MagicMenu instead - it' bigger and better. :)
  32.  
  33.  
  34. FEATURES/TOOLTYPES ADDED SINCE LAST RELEASE :
  35.  
  36.  POPSCREEN
  37.  
  38.  - pop screen with active menu to front.
  39.  
  40.  MOUSEMOVE=x
  41.  
  42. If moved more then x pixels while holding right button, the old way of menu
  43. selection (hold-select-release) will be used. Just leave it untouched.
  44.  
  45. FEATURES STILL MISSING :
  46.  
  47.  - Right mouse button should cancel menu like in Magic Menu.
  48.  - keyboard control
  49.  - nice icon :-)
  50.  
  51. (VERY) TECHNICAL INFO :
  52.  
  53. Program installs custom CxObject via commodities.library, which monitors all
  54. input events. Event of releasing right mouse is swalowed if the menu is on
  55. (flag WFLG_MENUSTATE is set in IntuitionBase->ActiveWindow->Flags). Event of
  56. clicking left or right button is changed into releasing of right button, and
  57. middle button click is changed into left button click. That's all. No system
  58. function is patched. No other high priority task, which can cause crash or
  59. deadlock is running.
  60.  
  61. The POPSCREEN feature is a kind of hack. Screen popping is done via
  62. ScreenToFront() function from intuition.library, but all the code of custom
  63. CxObject runs as a part of input.device task, and it is not safe to call
  64. any complex dos or intuition functions from tasks. It seems to work under
  65. OS 3.0, but I cannot guarantee this for any other OS version. If it doesn't
  66. work, just tell me. I'll rewrite it in a more clean way.
  67.  
  68. Because ScreenToFront() does not work when menu is already on, it have to be
  69. done before intuition draws menu and sets WFLG_MENUSTATE in
  70. ActiveWindow->Flags. So it's not possible to find out if the menu actualy will
  71. be drawn or not. ClickForMenu will bring screen to front only if right mouse
  72. button is pressed, left button is not pressed and ActiveWindow->MenuStrip is
  73. not NULL. This does not guarantee than menu will be really drawn, but is
  74. sufficient for most cases. Sometimes, when program utilises right button also
  75. for other things than intuition menu via WFLG_RMBTRAP (like Personal Paint for
  76. drawing), screen will be popped to front. This is harmless, but may be
  77. confusing. Unfortunately I can do nothing about it. Other programs, which may
  78. cause similar problems are commodities like MCP or MultiCX which traps right
  79. mouse button for different actions. This can be solved by setting CX_PRIORITY
  80. of such commodities higher than CX_PRIORITY of ClickForMenu.
  81.  
  82. I hope you will find these bytes useful. Any ideas, suggestions, questions or
  83. donations are welcome.
  84.  
  85.                    Frantisek Dufka
  86.  
  87. P.S. Sorry for my english, but it's not my native language.
  88.  
  89.